%-------------------------------------------------------------------------
% Sub routine Data definitions
%
% Estimation Codes for State-Level Results in  
% Ben-David, Itzhak, Sebastain Weber, and Pascal Towbin 
% "Inferring Expectations from Observables: Evidence from the Housing Market" 
% Review of Economics and Statistics
% ------------------------------------------------------------------------ 

%% Compute state specific information and generate labels
is2=0;
for is=1:51
if is==37
else    
    is2=is2+1;
    StateLab(1,is2)=State(t*is);
    StateLab_check(1,is2)=StateName(is);
    sup_elast_rank(1,is2)=se_0_5(is); 
end
end

 name={'Sand', 'All except Sand'};
 stand={'notstand' 'stand' };
 
%% Set time axis on charts
timestr = Year(first_obs+p:ende,1);                        % Retrieve dates
spacing = size(timestr,1);                                 % Set end date on axes
for ii=1:6; spacing = [spacing(1,ii)-4*ii, spacing]; end   % Set gaps between date on axis
peakdate=find(v_year==2006)-p;                             % Set peak date for housing price 
troughdate=find(v_year==1996)-p;                           % Set start date for housing price normalization
troughdate2=find(v_year==2012)-p;                          % Set trough date for housing bust 
 